package com.example.spring5.designmode.observer;

/**
 * 观察者
 * @Author: Hu Rui
 * @Date: 2021/11/12 13:57
 */
public class ObserverTest {
    public static void main(String[] args) {
        Observerable observerable = new Observerable();
        observerable.add(new PhoneObserver());
        observerable.add(new MessageObserver());
        observerable.add(new EmailObserver());
        observerable.notifyObservers(1, "恭喜你，注册成功");
    }
}
